<ion-view title="提现" class="p-gray-bg">
    <ion-nav-bar class="bar-energized">
        <ion-nav-back-button class="button-icon ion-chevron-left">
        </ion-nav-back-button>

    </ion-nav-bar>
    <ion-content>
        <div ng-show="isWithdraw">

            <div class="list">

                <div class="item item-input" ng-class="{true:'item-select'}[bankCards.length>0]">
            <span style="width:25%" class="input-label">
                银行卡
            </span>
                    <div ng-show="bankCards.length>0">
                        <select ng-model="selectedCard.CardNumber" ng-options="card.CardNumber as card.Title for card in bankCards" ng-change="changeCard()">
                            <!--<option ng-repeat="card in bankCards" ng-selected="card.IsDefaultCard" value="{{card.CardNumber}}">{{getCardName(card)}}</option>-->
                        </select>
                    </div>
                    <div class="center" ng-show="bankCards.length==0">
                        <div>亲，<a href="#/tab/bank-cards" class="energized"><font class="energized">点击这里</font></a>绑卡后才能提现！</div>
                    </div>
                </div>

                <div class="item item-input">
                    <span style="width:25%" class="input-label left-margin-1em">提现金额</span>
                    <input type="number" class="orangebox" ng-model="sum" placeholder="请输入金额">
                </div>

                <div class="item item-input" ng-show="false">
                    <span style="width:25%" class="input-label left-margin-1em">备注说明</span>
                    <input type="text" class="orangebox" ng-model="memo" value="提现说明!" placeholder="备注说明" style="font-size: 14px;">
                </div>

                <div class="item" style="margin-top: 0;padding:0;">
                    <a class="button button-full button-energized " ng-click="withdraw(sum, selectedCard.RealName, selectedCard.CardNumber, selectedCard.BankName, '2')">申请提现</a>
                </div>

            </div>

        </div>

        <div ng-show="isDetailWithdraw">
            <div class="list">
                <div class="item item-divider">
                </div>

                <a class="item">
                    <div style="float: left">账号名称</div>
                    <div style="float: right">{{withdrawInfo.AccountName}}</div>
                </a>

                <a class="item">
                    <div style="float: left">提现金额(元)</div>
                    <div style="float: right">{{withdrawInfo.Amount}}</div>
                </a>

                <a class="item">
                    <div style="float: left">账号类型</div>
                    <div style="float: right">{{withdrawInfo.BankType|withdrawBankType}}</div>
                </a>

                <a class="item">
                    <div style="float: left">提现账号</div>
                    <div style="float: right">{{withdrawInfo.BankCardNo}}</div>
                </a>

                <a class="item" ng-show="withdrawInfo.BankCardDesc!='undefined'">
                    <div style="float: left">提现说明</div>
                    <div style="float: right">{{withdrawInfo.BankCardDesc}}</div>
                </a>

                <a class="item">
                    <div style="float: left">提现状态</div>
                    <div style="float: right; color: #f1592a">{{withdrawInfo.Status|withdrawStatus}}</div>
                </a>

            </div>
        </div>
    </ion-content>
</ion-view>
